package com.yycx.module.bus.client.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.yycx.common.mybatis.base.entity.AbstractEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.yycx.common.mybatis.annotation.TableAlias;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 销售单
 *
 * @author flyme
 * @date 2020-08-17
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("bus_order")
@TableAlias("ord")
@ApiModel(value = "BusOrder对象", description = "销售单")
public class BusOrder extends AbstractEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "orderId", type = IdType.ASSIGN_ID)
    private Long orderId;

    @ApiModelProperty(value = "父ID")
    private Long parentId;


    @ApiModelProperty(value = "单号")
    private String orderNo;

    @ApiModelProperty(value = "流程实例ID")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String processInstanceId;

    @ApiModelProperty(value = "账套ID")
    private Long companyId;

    @ApiModelProperty(value = "供应商")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Long supplierId;

    @ApiModelProperty(value = "机构")
    private Long organizationId;

    @ApiModelProperty(value = "发货方式(1:全款,2:资信)")
    private Integer delivery;

    @ApiModelProperty(value = "供应商资信类型")
    private Integer supplierBondType;

    @ApiModelProperty(value = "客户资信方式")
    private Integer customBondType;

    @ApiModelProperty(value = "打印状态")
    private  Integer printTag;

    @ApiModelProperty(value = "客户")
    private Long customId;

    @ApiModelProperty(value = "部门")
    private Long deptId;

    @ApiModelProperty(value = "保证金ID")
    private Long bzjId;

    @ApiModelProperty(value = "业务员")
    private Long saleManId;

    @ApiModelProperty(value = "单据形式(1:销售,2:退货,3:补货)")
    private Integer orderType;


    @ApiModelProperty(value = "发货日期")
    private Date sendDate;

    @ApiModelProperty(value = "订单状态")
    private Integer orderState;

    @ApiModelProperty(value = "订单状态")
    private Integer revokeState;

    @ApiModelProperty(value = "内勤")
    private Long userId;

    @ApiModelProperty(value = "收款日期")
    private Date takeDate;

    @ApiModelProperty(value = "收款金额")
    private BigDecimal takeAmount;


    @ApiModelProperty(value = "收款银行")
    private Long bankId;

    @ApiModelProperty(value = "发票邮寄方式#1：货票同行 2：单独邮寄")
    private Integer invoiceSendType;

    @ApiModelProperty(value = "收货地址")
    private Long customShId;

    @ApiModelProperty(value = "发票收件人")
    private Long customFpId;


    @ApiModelProperty(value = "发货单号")
    private String sendNo;



    @ApiModelProperty(value = "随货资料")
    private String sendAttachment;

    @ApiModelProperty(value = "随发票资料")
    private String invoiceAttachment;

    @ApiModelProperty(value = "备注")
    private String remark;
}
